package com.tal.jzb.schedul;

import com.tal.jzb.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author xiefengsong
 * @date 2019-01-24 10:32
 */
@Component
@Slf4j
public class UserScheduledTask {

    @Autowired
    UserService userService;

    @Scheduled(cron = "0 53 10 * * ?")
    public void getUserInfo() {
        String name = userService.getUserById(1);
        log.info("调度成功");
    }


}
